import { genBase64Url } from "./genImageFromBase64"

export const openImageWindow = (base64) => () => {
    const img = new Image()
    img.src = genBase64Url(base64)
    const newWin = window.open('', '_blank')
    newWin.document.write(img.outerHTML)
    newWin.document.title = '截图'
    newWin.document.body.style.backgroundColor = '#000'
    newWin.document.body.style.margin = '0'
    newWin.document.body.style.textAlign = 'center'
    newWin.document.close()
}